package com.buba.service.geren;

import com.buba.dao.UserMapper;
import com.buba.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("gerenService")
public class GerenServiceImpl implements GerenService{
    @Autowired(required = false)
    UserMapper userMapper;
    @Override
    public User findByUsercodeAndPassword(User user) {
        return userMapper.findByUsercodeAndPassword(user);
    }

    @Override
    public int updatePassword(User user1) {
        return userMapper.updateByPrimaryKeySelective(user1);
    }

    @Override
    public User findByUsercode(String usercode) {
        return userMapper.findByUsercode(usercode);
    }

    @Override
    public int updatePersonalInfo(User user) {
        return userMapper.updateByPrimaryKeySelective(user);
    }
}
